package com.aaron.sqlSession;

import com.aaron.pojo.MappedStatement;

import java.sql.SQLException;
import java.util.List;

public interface SqlSession {

    //查询所有
    <E> List<E> selectList(String statementId, Object... params) throws SQLException, Exception;

    //根据条件查询单个
    <T> T selectOne(String statementId, Object... params) throws Exception;

    //查询所有
    <E> List<E> selectList(MappedStatement mappedStatement, Object... params) throws SQLException, Exception;

    //根据条件查询单个
    <T> T selectOne(MappedStatement mappedStatement, Object... params) throws Exception;

    <T> T getMapper(Class<?> mapperClass);
}
